package ren.steve.model.system.bean;

import ren.steve.model.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

@Data
@ApiModel(description = "部门")
@TableName("system_dept")
public class SystemDept extends BaseEntity {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "部门名称")
	@TableField("title")
	private String title;

	@ApiModelProperty(value = "上级部门ID")
	@TableField("parent_id")
	private Integer parentId;

	@ApiModelProperty(value = "上级部门名称")
	@TableField("parent_name")
	private String parentName;

	@ApiModelProperty(value = "负责人ID")
	@TableField("leader_id")
	private Long leaderId;

	@ApiModelProperty(value = "负责人名称")
	@TableField("leader_name")
	private String leaderName;

	@ApiModelProperty(value = "排序")
	@TableField("sort")
	private Integer sort;

	@ApiModelProperty(value = "下级部门")
	@TableField(exist = false)
	private List<SystemDept> children;

}